﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ArgusControls
{
	public partial class LabeledImageButton : Button
	{
		public LabeledImageButton()
		{
			InitializeComponent();
		}

		public Stretch ImageStretch
		{
			get { return this.cImage.Stretch; }
			set { this.cImage.Stretch = value; }
		}

		public ImageSource ImageSource
		{
			get { return this.cImage.Source; }
			set { this.cImage.Source = value; }
		}

		public string Text
		{
			get { return (string)GetValue(TextProperty); }
			set { SetValue(TextProperty, value); }
		}

		public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(LabeledImageButton), new PropertyMetadata("Button", OnTextPropertyChanged));
		private static void OnTextPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
		{
			LabeledImageButton Sender = (LabeledImageButton)sender;
			Sender.cTextBlock.Text = (string)e.NewValue;
		}
	}
}
